Using a single Azure Function to access multiple users' resources on their behalf
up vote
0
down vote
favorite
TL;DR: I'm not sure how to go about accessing multiple users' in our organization's calendar resources (read only), and if it's possible to do so in a single Azure Function. Any guidance to what I can do would be much appreciated.
As the title says, I'm looking for a way to access multiple user's resources on their behalf using Azure Functions and the Microsoft Graph API. Currently I have a little bit of experience using the Auth Token binding, but so far I've only been able to use a single user-id as an input to fetch the token they'd consented access to. I'd like to be able to access multiple users' tokens in a single function, regardless of if I need to use the Auth Token binding or coding in some other method of obtaining and retrieving said tokens. Currently the only way that I can see making this work with the Auth Token binding would be to create an Azure Function for each of our users individually, which would require an administrator to create a new function for each new user. Is there another way I can do this so that I can limit the requirements to a single function? My hope is to be able to loop through each token (or user-id to fetch said token) and check their calendar events in said loop. I like this because it means that any new users that are added will not need a new function created solely for them, which means less administration overhead. It's important to note that this is designed to run for < 10 users at a time and < 50 appt's per day. We will be running the function once per day at a certain time.
If you're wondering, our use case is to be able to look at multiple users' calendars in our organization and then be able to send reminder SMS messages to numbers included in each appointment in each users' calendar.
azure azure-web-sites microsoft-graph azure-functions function-binding
add a comment |
up vote
0
down vote
favorite
TL;DR: I'm not sure how to go about accessing multiple users' in our organization's calendar resources (read only), and if it's possible to do so in a single Azure Function. Any guidance to what I can do would be much appreciated.
As the title says, I'm looking for a way to access multiple user's resources on their behalf using Azure Functions and the Microsoft Graph API. Currently I have a little bit of experience using the Auth Token binding, but so far I've only been able to use a single user-id as an input to fetch the token they'd consented access to. I'd like to be able to access multiple users' tokens in a single function, regardless of if I need to use the Auth Token binding or coding in some other method of obtaining and retrieving said tokens. Currently the only way that I can see making this work with the Auth Token binding would be to create an Azure Function for each of our users individually, which would require an administrator to create a new function for each new user. Is there another way I can do this so that I can limit the requirements to a single function? My hope is to be able to loop through each token (or user-id to fetch said token) and check their calendar events in said loop. I like this because it means that any new users that are added will not need a new function created solely for them, which means less administration overhead. It's important to note that this is designed to run for < 10 users at a time and < 50 appt's per day. We will be running the function once per day at a certain time.
If you're wondering, our use case is to be able to look at multiple users' calendars in our organization and then be able to send reminder SMS messages to numbers included in each appointment in each users' calendar.
azure azure-web-sites microsoft-graph azure-functions function-binding
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
TL;DR: I'm not sure how to go about accessing multiple users' in our organization's calendar resources (read only), and if it's possible to do so in a single Azure Function. Any guidance to what I can do would be much appreciated.
As the title says, I'm looking for a way to access multiple user's resources on their behalf using Azure Functions and the Microsoft Graph API. Currently I have a little bit of experience using the Auth Token binding, but so far I've only been able to use a single user-id as an input to fetch the token they'd consented access to. I'd like to be able to access multiple users' tokens in a single function, regardless of if I need to use the Auth Token binding or coding in some other method of obtaining and retrieving said tokens. Currently the only way that I can see making this work with the Auth Token binding would be to create an Azure Function for each of our users individually, which would require an administrator to create a new function for each new user. Is there another way I can do this so that I can limit the requirements to a single function? My hope is to be able to loop through each token (or user-id to fetch said token) and check their calendar events in said loop. I like this because it means that any new users that are added will not need a new function created solely for them, which means less administration overhead. It's important to note that this is designed to run for < 10 users at a time and < 50 appt's per day. We will be running the function once per day at a certain time.
If you're wondering, our use case is to be able to look at multiple users' calendars in our organization and then be able to send reminder SMS messages to numbers included in each appointment in each users' calendar.
azure azure-web-sites microsoft-graph azure-functions function-binding
TL;DR: I'm not sure how to go about accessing multiple users' in our organization's calendar resources (read only), and if it's possible to do so in a single Azure Function. Any guidance to what I can do would be much appreciated.
As the title says, I'm looking for a way to access multiple user's resources on their behalf using Azure Functions and the Microsoft Graph API. Currently I have a little bit of experience using the Auth Token binding, but so far I've only been able to use a single user-id as an input to fetch the token they'd consented access to. I'd like to be able to access multiple users' tokens in a single function, regardless of if I need to use the Auth Token binding or coding in some other method of obtaining and retrieving said tokens. Currently the only way that I can see making this work with the Auth Token binding would be to create an Azure Function for each of our users individually, which would require an administrator to create a new function for each new user. Is there another way I can do this so that I can limit the requirements to a single function? My hope is to be able to loop through each token (or user-id to fetch said token) and check their calendar events in said loop. I like this because it means that any new users that are added will not need a new function created solely for them, which means less administration overhead. It's important to note that this is designed to run for < 10 users at a time and < 50 appt's per day. We will be running the function once per day at a certain time.
If you're wondering, our use case is to be able to look at multiple users' calendars in our organization and then be able to send reminder SMS messages to numbers included in each appointment in each users' calendar.
azure azure-web-sites microsoft-graph azure-functions function-binding
azure azure-web-sites microsoft-graph azure-functions function-binding
asked Nov 11 at 4:16
cody.codes
286413
286413
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
3
down vote
accepted
I see two main directions you could try:
- Create an additional Azure Function that extracts all relevant user IDs and pass each ID to the second Azure Function (if you wish to continue using Token From ID).
- You might be able to use OAuth's Client Credentials flow, meaning a dedicated token for the Azure Function that can be used to access the required resources. This might allow you to both iterate over the list of relevant users and extract the required information for each user in the same function.
Hope it helps!
Hi Itay! Thanks for your answer; I do like your first direction, and after doing a bit of research and experimentation I was able to successfully pass in a user ID via an HTTP route; now I can actually use a function that grabs user IDs and calls a second Azure function for each of the users to be able to have their events read.
– cody.codes
Nov 12 at 1:04
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
accepted
I see two main directions you could try:
- Create an additional Azure Function that extracts all relevant user IDs and pass each ID to the second Azure Function (if you wish to continue using Token From ID).
- You might be able to use OAuth's Client Credentials flow, meaning a dedicated token for the Azure Function that can be used to access the required resources. This might allow you to both iterate over the list of relevant users and extract the required information for each user in the same function.
Hope it helps!
Hi Itay! Thanks for your answer; I do like your first direction, and after doing a bit of research and experimentation I was able to successfully pass in a user ID via an HTTP route; now I can actually use a function that grabs user IDs and calls a second Azure function for each of the users to be able to have their events read.
– cody.codes
Nov 12 at 1:04
add a comment |
up vote
3
down vote
accepted
I see two main directions you could try:
- Create an additional Azure Function that extracts all relevant user IDs and pass each ID to the second Azure Function (if you wish to continue using Token From ID).
- You might be able to use OAuth's Client Credentials flow, meaning a dedicated token for the Azure Function that can be used to access the required resources. This might allow you to both iterate over the list of relevant users and extract the required information for each user in the same function.
Hope it helps!
Hi Itay! Thanks for your answer; I do like your first direction, and after doing a bit of research and experimentation I was able to successfully pass in a user ID via an HTTP route; now I can actually use a function that grabs user IDs and calls a second Azure function for each of the users to be able to have their events read.
– cody.codes
Nov 12 at 1:04
add a comment |
up vote
3
down vote
accepted
up vote
3
down vote
accepted
I see two main directions you could try:
- Create an additional Azure Function that extracts all relevant user IDs and pass each ID to the second Azure Function (if you wish to continue using Token From ID).
- You might be able to use OAuth's Client Credentials flow, meaning a dedicated token for the Azure Function that can be used to access the required resources. This might allow you to both iterate over the list of relevant users and extract the required information for each user in the same function.
Hope it helps!
I see two main directions you could try:
- Create an additional Azure Function that extracts all relevant user IDs and pass each ID to the second Azure Function (if you wish to continue using Token From ID).
- You might be able to use OAuth's Client Credentials flow, meaning a dedicated token for the Azure Function that can be used to access the required resources. This might allow you to both iterate over the list of relevant users and extract the required information for each user in the same function.
Hope it helps!
answered Nov 11 at 7:34
Itay Podhajcer
1,067212
1,067212
Hi Itay! Thanks for your answer; I do like your first direction, and after doing a bit of research and experimentation I was able to successfully pass in a user ID via an HTTP route; now I can actually use a function that grabs user IDs and calls a second Azure function for each of the users to be able to have their events read.
– cody.codes
Nov 12 at 1:04
add a comment |
Hi Itay! Thanks for your answer; I do like your first direction, and after doing a bit of research and experimentation I was able to successfully pass in a user ID via an HTTP route; now I can actually use a function that grabs user IDs and calls a second Azure function for each of the users to be able to have their events read.
– cody.codes
Nov 12 at 1:04
Hi Itay! Thanks for your answer; I do like your first direction, and after doing a bit of research and experimentation I was able to successfully pass in a user ID via an HTTP route; now I can actually use a function that grabs user IDs and calls a second Azure function for each of the users to be able to have their events read.
– cody.codes
Nov 12 at 1:04
Hi Itay! Thanks for your answer; I do like your first direction, and after doing a bit of research and experimentation I was able to successfully pass in a user ID via an HTTP route; now I can actually use a function that grabs user IDs and calls a second Azure function for each of the users to be able to have their events read.
– cody.codes
Nov 12 at 1:04
add a comment |
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53245788%2fusing-a-single-azure-function-to-access-multiple-users-resources-on-their-behal%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown