Hello there,
I wanted to explore the Microsoft graph API's for creating the online meeting events via teams meeting.
Now the events must be related to respective users. To get the user i have followed below.
I have enrolled into the trial version of the Microsoft 365 along with Azure services as well. Then registered application in azure with necessary application level read permission for user. Then able to generate the able to generate the oauth token via https://login.microsoftonline.com/{client_id}/oauth2/v2.0/token. Using the generated access token as bearer for the API "User by email" to get the user id.
But, i get below error
API : https://graph.microsoft.com/v1.0/users/{emai_address}/
Response :
{
"error": {
"code": "Request_ResourceNotFound",
"message": "Resource '{email_Address}' does not exist or one of its queried reference-property objects are not present."
}
}
API permissions :
"roles": [
"User.ReadBasic.All",
"DeviceManagementManagedDevices.Read.All",
"OnlineMeetings.Read.All",
"OnlineMeetings.ReadWrite.All",
"User.ReadWrite.All",
"Calendars.Read",
"Directory.ReadWrite.All",
"DeviceManagementServiceConfig.Read.All",
"User.EnableDisableAccount.All",
"User.Invite.All",
"Directory.Read.All",
"User.Read.All",
"DeviceManagementServiceConfig.ReadWrite.All",
"Calendars.ReadBasic.All",
"DeviceManagementConfiguration.Read.All",
"DeviceManagementManagedDevices.ReadWrite.All",
"Directory.Write.Restricted",
"User.Export.All",
"Calendars.ReadWrite",
"User.ManageIdentities.All",
"DeviceManagementConfiguration.ReadWrite.All",
"DeviceManagementManagedDevices.PrivilegedOperations.All",
"DeviceManagementApps.ReadWrite.All",
"DeviceManagementApps.Read.All"
],
the email address used in the above request is same as the address used during the registration of the account in office 365 and Azure portal.
Where am I going wrong.