I am trying to use graph.microsft.com apis for user invinting to the AD account. I was able to invite but when try to get the token using https://login.microsoftonline.com/xxxx.onmicrosoft.com/oauth2/token i am getting the above error. I am using this key along with other required keys in the header. [{"key":"resource","value":"https://graph.microsoft.com","description":""}]
Can you please let me know what is the issue? Complete log.
{ "error": "invalid_grant", "error_description": "AADSTS50034: The user account Microsoft.AzureAD.Telemetry.Diagnostics.PII does not exist in the xxxxx.onmicrosoft.com directory. To sign into this application, the account must be added to the directory.\r\nTrace ID: 5537uiy4b-4473-4cfb-b45c-1281f61e2100\r\nCorrelation ID: 8121era7-8df4-47d5-8cc5-3d2f8371029b0\r\nTimestamp: 2019-02-26 11:04:46Z", "error_codes": [ 50034 ], "timestamp": "2019-02-26 11:04:46Z", "trace_id": "5537db4b-4473-4cfb-b45c-1281f61e2100", "correlation_id": "812138a7-8df4-47d5-8cc5-3d2f8a1029b0" }
I am using client_id,client_secret,username,password,scope,resource and grant_type . I tried this for both invited member type is guest/member