Tim Strehle
Tim Strehle

Reputation: 390

How to get the current user’s Delve URL via Microsoft Graph API

When a user signs into my Web app via Microsoft OAuth2, I want to display her name, email address, and a link to her homepage or profile page.

I can get displayName and mail from https://graph.microsoft.com/v1.0/me/, but I haven’t found a homepage or profile URL.

The user’s Delve page would seem like a good choice. Mine has a URL like https://eur.delve.office.com/?u=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx&v=work.

How can I get that URL, i.e. the current user’s Delve profile page URL, via the Graph API?

Alternatively, is there another profile page URL I can get?

Upvotes: 3

Views: 2204

Answers (2)

fargusto
fargusto

Reputation: 348

This should work;

https://eur.delve.office.com/?p={email address}

it will redirect you to

https://eur.delve.office.com/?p={email ID}%40{domain}&v=work

Somthing like

https://eur.delve.office.com/?p=name.lastname%40mydomain.com&v=work

Upvotes: 0

Marc LaFleur
Marc LaFleur

Reputation: 33124

The URI isn't included in a user's profile but you can build the Delve URI without too much trouble.

The prototype for the URI is https://{tenant-address}/?u={user-id}&v=work.

If replace the {tenant-address} with your Delve address and the {user-id} with the id you receive from /me you can provide a link to that user's profile on Delve.

Upvotes: 2

Related Questions