{"error":{"code":"ErrorAccessDenied","message":"Access is denied. Check credentials and try again."}}

rumaana begum 1 Reputation point

Hello Community,

I have created an API and it was running successfully for 2 years, but suddenly last week it stopped, when i tried to get access token after code, I started getting it as invalid grant type, when i checked the API permissions, I noticed that all my calendar persmissions are gone and replaced with directory permissions, when I try to give calendar permissions it keeps on getting changed with directory. I dont know why its happening, after some try I corrected it and got access and refresh token, in that(You can see below again consist of all unneccesary permission), my goal is to create event for that calendar alone is needed, why it is keep on chnaging? after getting tokens when i try to create event I get this

{"error":{"code":"ErrorAccessDenied","message":"Access is denied. Check credentials and try again."}}.

Im using,

response = invokeurl


	url :"https://graph.microsoft.com/v1.0/users/*&&*&*&**&/events"

	type :POST




Please help me

"scope": "openid profile email https://graph.microsoft.com/Calendars.Read https://graph.microsoft.com/Calendars.Read.Shared https://graph.microsoft.com/Calendars.ReadWrite https://graph.microsoft.com/Calendars.ReadWrite.Shared https://graph.microsoft.com/Directory.Read.All https://graph.microsoft.com/Directory.ReadWrite.All https://graph.microsoft.com/Mail.Read https://graph.microsoft.com/User.Read https://graph.microsoft.com/User.Read.All https://graph.microsoft.com/User.ReadBasic.All https://graph.microsoft.com/User.ReadWrite.All",
    "expires_in": 4699,

Microsoft Authenticator
Microsoft Authenticator
A Microsoft app for iOS and Android devices that enables authentication with two-factor verification, phone sign-in, and code generation.
5,619 questions
0 comments No comments
{count} votes